<?php
chdir("..");
include "t16cms/php/config.php";
include "t16cms/php/user.php";
include "forum/functions.php";
include "forum/xstylea.php";




mysql_connect($dbhost, $dbuser, $dbpasswd);
mysql_query('SET NAMES cp1251');


$query="select * from `".$dbprefix."forum_categories` ORDER BY `pos` ASC ";


$result=mysql_db_query($dbname, $query);
$i=1;
while($row=mysql_fetch_array($result)) {
  $forum_cat[$i]=$row;
  $i++;

};
mysql_free_result($result);
$cnt=$i;

ob_start();
get_reg();
ob_end_clean();

if (get_right($site_user['access'],6)) {
categories($top,true,true);

$site_output=$site_output.admins('<a href="'.$site_url.'/forum/admin/new.php?authkey='.$_GET['authkey'].'">New category/sub category</a>');

}else{
$site_output="<br />Acess restricted<br /><br />";
}

include "forum/menu.php";
include "forum/style.php";
?>